<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head th:include="/system/com/header :: header">

</head>
  <body>
    <header class="header">

      <!--      顶部菜单-->
      <nav class="navbar navbar-expand-lg" th:include="/system/com/topBar :: topBar"></nav>
    </header>
    <div class="d-flex align-items-stretch">
      <nav id="sidebar" th:include="/system/com/leftBar :: leftBar"></nav>
      <!-- Sidebar Navigation end-->
      <div class="page-content">
        <!-- Page Header-->
        <div class="page-header no-margin-bottom">
          <div class="container-fluid">
            <h2 class="h5 no-margin-bottom">小说管理</h2>
          </div>
        </div>
        <!-- Breadcrumb-->
        <div class="container-fluid">
          <ul class="breadcrumb">
            <li class="breadcrumb-item"><a href="index.html">首页</a></li>
            <li class="breadcrumb-item active">书籍管理</li>
          </ul>
        </div>
        <section class="no-padding-top">
          <div class="container-fluid">
            <div class="row">
			  <!-- 要使用的表格 -->
              <div class="col-lg-12">
                <div class="block">
                  <div class="title"><strong>小说信息表</strong></div>
                  <div class="table-responsive"> 
                    <table class="table table-striped table-hover">
                      <thead>
                        <tr>
                          <th>#</th>
                          <th>小说封面</th>
                          <th>小说名</th>
                          <th>小说作者</th>
                          <th>小说类型</th>
                          <th>小说介绍</th>
                          <th>小说加入时间</th>
                          <th>小说更新时间</th>
                          <th>操作</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr th:each="eo : ${bookInfo}">

                          <th scope="row">1</th>
                          <td ><img th:src="@{${eo.bookImgurl}}" alt="用户头像" class="img-thumbnail" style="width: 50px;height: 50px;"></td>
                          <td th:text="${eo.bookName}">Otto</td>
                          <td th:text="${eo.bookAuthor}">@mdo</td>
                          <td th:text="${eo.bookType}">@mdo</td>
                          <td style="display:block;width:10em;word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"  th:text="${eo.bookDesc}">@mdo</td>
                          <td th:text="${eo.bookAddtime}">@mdo</td>
                          <td th:text="${eo.bookUpdatetime}">@mdo</td>
                          <td>
                            <div>
                              <button type="button" th:onclick="window.location.href='/sys/user/edit?id=[[${eo.bookId}]]'" class="btn btn-primary">编辑 </button>
                            </div>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
                <div style="text-align: center;margin-top: 20px;">
                  <ul style="height: 58px;list-style: none;display: block;text-align: center;">
                    <li><a th:href="${'/sys/bookInfo?id=0'}" class="btn" style="float:left;background-color: #212529;color: #FFFFFF;border: 1px solid #FFFFFF;font-size: 1rem;">首页</a></li>
                    <li th:each="i:${#numbers.sequence(1,page)}">
                      <a th:href="${'/sys/bookInfo?id='+(i - 1) * 10}" class="btn" th:text="${i}" style="float:left;margin-left:2px;background-color: #212529;color: #FFFFFF;border: 1px solid #FFFFFF;font-size: 1rem;">1</a>
                    </li>
                    <li><a th:href="${'/sys/bookInfo?id='+(page - 1) * 10}" class="btn" style="float:left;margin-left:2px;background-color: #212529;color: #FFFFFF;border: 1px solid #FFFFFF;font-size: 1rem;">尾页</a></li>
                  </ul>
                </div>
              </div>

            </div>
			  <!-- 结束 -->
            </div>
          </div>
        </section>
        <footer class="footer" th:include="/system/com/footBar :: footBar"></footer>
      </div>
    </div>
    <!-- JavaScript files-->
    <script th:src="@{/system/vendor/jquery/jquery.min.js}"></script>
    <script th:src="@{/system/vendor/popper.js/umd/popper.min.js}"> </script>
    <script th:src="@{/system/vendor/bootstrap/js/bootstrap.min.js}"></script>
    <script th:src="@{/system/vendor/jquery.cookie/jquery.cookie.js}"> </script>
    <script th:src="@{/system/vendor/chart.js/Chart.min.js}"></script>
    <script th:src="@{/system/vendor/jquery-validation/jquery.validate.min.js}"></script>
    <script th:src="@{/system/js/charts-home.js}"></script>
    <script th:src="@{/system/js/front.js}"></script>
  </body>
</html>